package com.ymatou.query.trading.api.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;

import com.ymatou.query.trading.api.parameter.GetSendCouopnCountOfPlatformBean;
import com.ymatou.query.trading.api.service.GetSendCouopnCountOfPlatformCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.common.enums.PlatformEnum;
import com.ymttest.utils.constant.ECode;

/**
 * 获取指定买家的各平台的优惠券的领用数量 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetSendCouopnCountOfPlatform {

	private static GetSendCouopnCountOfPlatformBean getsendcouopncountofplatformbean;
	private static GetSendCouopnCountOfPlatformCall getsendcouopncountofplatformcall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取指定买家的各平台的优惠券的领用数量");
	}

	@Before
	public void caseUp() {

		getsendcouopncountofplatformbean = new GetSendCouopnCountOfPlatformBean();
		getsendcouopncountofplatformcall = new GetSendCouopnCountOfPlatformCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getsendcouopncountofplatformcall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	//@Test 废弃
	@Category(P1.class)
	@TestCase
	public void Tc_GetSendCouopnCountOfPlatform_001() {
		Logger.start(true,"获取指定买家的各平台的优惠券的领用数量成功");
		try {
			// 参数
			getsendcouopncountofplatformbean.setBuyerId(1113);
			getsendcouopncountofplatformbean.setPlatformType(PlatformEnum.Shangou_APP);
			// 发送请求
			getsendcouopncountofplatformcall.setData(getsendcouopncountofplatformbean);
			getsendcouopncountofplatformcall.callService();
			Logger.comment("getsendcouopncountofplatformcall send:"
					+ getsendcouopncountofplatformcall.getEntityString());
			Logger.comment("getsendcouopncountofplatformcall response:"
					+ getsendcouopncountofplatformcall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, getsendcouopncountofplatformcall.getCode(), "验证Code");
			// Logger.verifyEquals(ErrorCode.SUCCESSMSG,
			// getsendcouopncountofplatformcall.getMsg(), "验证Msg");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}


}